# 3.16 OLED Display ## 3.16.1 Overview OLED display is also called organic light-emitting diode or organic dot laser display. This display is self-luminous. It adopts a very thin coating of organic materials and glass substrate which will light up if current passes through. Therefore, it does not require a back-light. Note that it will not light up when just powering on; programing and wiring are also needed. Besides, it features large viewing Angle, low power consumption, high contrast, thin display, fast response, simple structure, and can work on flexion boards within a wide temperature range. ## 3.16.2 Schematic Diagram Communication mode: I2C communication Internal driver chip: SSH1106 Resolution: 128 x 64 ## 3.16.3 Code Blocks 1. ![](./media/j53.png) This block initializes OLED display, which is necessary when using OLED module. 2. ![](./media/j54.png) This block sets size and color of the displayed text. The default settings are usually used. 3. ![](./media/j55.png) This block sets the position of text starting to be displayed on the OLED. 4. ![](./media/j56.png) This block inputs the printing text on OLED, and only strings are available. 5. ![QQ_1721202190912](./media/j57.png) This block displays icons. Some commonly used icons are integrated in this block. 6. ![](./media/j58.png) This block clears all text on OLED. 7. ![](./media/j59.png) This block refreshes OLED display. This block should be added after your settings. Otherwise, they are invalid. ## 3.16.4 Test Code ### 3.16.4.1 Build Code There are two ways to upload the code: directly open the code file we provide; or manually build blocks. **Directly open the code file we provide:** 1. Click ![](./media/j68.png) and choose `Load from your computer` ![](./media/j67.png) 2. We have already downloaded the codes on computer desktop, so open the file and choose `3-16-oled.sb3` **Manually build blocks:** 1. In ![events](./media/events.png), find ![j1](./media/j1.png) block. 2. In ![](./media/oled.png), find and put ![](./media/j53.png) and ![](./media/j54.png) under ![j1](./media/j1.png) in sequence. 3. Add ![](./media/j58.png) under ![](./media/j54.png) 4. In ![control](./media/control.png), put ![j2](./media/j2.png) under ![](./media/j58.png) 5. Put ![](./media/j55.png) into ![j2](./media/j2.png) 6. Add a ![](./media/j56.png) under ![](./media/j55.png), and you can modify the text into whatever you like. 7. Put ![](./media/j59.png) under ![](./media/j56.png) **Complete Test Code** ![QQ_1721353998374](./media/6-16-4-1.png) ### 3.16.4.2 Test Result After uploading code, you will see the OLED shows the text you set. Here we maintain it as default, so it displays “Hello KidsBlock”, as shown below: ![6-16-4-2](./media/6-16-4-2.png)